<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增休假明细')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <input name="projects" id="projects" type="hidden" th:value="${projects}">
        <form class="form-horizontal m" id="form-SysHolidayDetail-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">序号：</label>
                <div class="col-sm-8">
                    <input name="serialNum" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">项目名称：</label>
                <div class="col-sm-8">
                    <input name="projectName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工名称：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">年份：</label>
                <div class="col-sm-8">
                    <input name="year" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">年假时长(小时）：</label>
                <div class="col-sm-8">
                    <input name="yearHolTotal" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">休假日期：</label>
                <div class="col-sm-8">
                    <input name="holidayDate" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">已休年假时长(小时）：</label>
                <div class="col-sm-8">
                    <input name="yearHolDate" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">已休事假时长(小时）：</label>
                <div class="col-sm-8">
                    <input name="casuHolDate" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">已休病假时长(小时）：</label>
                <div class="col-sm-8">
                    <input name="sickHolDate" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="bak" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "hrm/sysHoliday"

        $(function(){
            initChoice();
        })

        function initChoice(){
            $("#chooseCharge input").each(function(){
               $(this).parent().addClass("checked")
               $(this).attr("checked",true)
            });
        }


    $("#form-SysHolidayDetail-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-SysHolidayDetail-add').serialize());
            }
        }
    </script>
</body>
</html>